#include <stdio.h>

int main()
{
	long long int n,m,p,q;
	scanf_s("%d", &n);
	p = 1;
	q = 0;
	if (n == 0)
		printf("%d", q);
	else
	{
		while(n!=0)
		{
			m = n % 2;
			m = m * p;
			p = p * 10;
			q = q + m;
			n = n / 2;
		}
		printf("%lld", q);
	}
	return 0;
}